<script setup>
import {useRouter} from "vue-router";

const router = useRouter()

const props = defineProps({
  title: {type: String, default: '暂无数据'},
  goBackBtnVisible: {type: Boolean, default: true}
})

const goBack = () => {
  router.back()
}
</script>

<template>
  <div class="no-data">
    <img src="@/assets/imgs/ProductDataNull.svg" alt="">
    <div class="flex-center title text-3xl dark:text-gray-100">
      <span class="text-center">{{ title }}</span>
    </div>
    <div v-if="goBackBtnVisible" class="mt-8 flex-center">
      <van-button @click="goBack" color="linear-gradient(to right, #fed0a2, #f27c3d)">
        返回
      </van-button>
    </div>
  </div>
</template>

<style scoped lang="scss">

</style>